home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / msdos / xset400.zip / PATCH.DOS < prev    next >
Text File  |  1993-12-21  |  2KB  |  44 lines

  1.               Patching COMMAND.COM default environment size
  2.               =============================================
  3.  
  4.  
  5. The default environment size for a new COMMAND.COM being loaded is hardcoded
  6. in the COMMAND.COM program and is in most of the case largely  insufficient.
  7. Here is the way to change this value.
  8.  
  9. The presented sections of code are from MS-DOS 5.00 dis-assembled with DEBUG
  10. so that those with  other  versions  of  DOS  find  the  offsets  for  their
  11. COMMAND.COM. In other DOS versions, the section of code  to  be  patched  is
  12. unchanged, it is simply shifted in position  so  it's  just  a  question  of
  13. locating the correct offsets by searching for  strings  of  bytes  from  the
  14. sections of code listed below. The main trick here is to avoid addresses  in
  15. the code which are likely to be different (most absolute addresses  will  be
  16. different while relative addresses may or may not  be  different).  Assuming
  17. you're handy with DEBUG or a similar debugger and know some  8088  assembly,
  18. you should be able to pull it off. If DEBUG's search command is too limited,
  19. you might try Unassembling the whole COMMAND.COM to a text file and using an
  20. editor or lister utility to search.
  21.  
  22. ENVIRONMENT SIZE:       Search for '10 00' for other DOS versions than 5.0
  23.  
  24. -u 165b
  25.  
  26. 1111:165B 58            POP   AX
  27. 1111:165C C706C01E5100  MOV   WORD PTR [1EC0],0051
  28. 1111:1662 C706BE1E1000  MOV   WORD PTR [1EBE],0010  <<default envir. size>>
  29. 1111:1668 BAD498        MOV   DX,98D4
  30. 1111:166B B104          MOV   CL,04
  31. 1111:166D D3EA          SHR   DX,CL
  32. 1111:166F 8916CE1E      MOV   [1ECE],DX
  33. 1111:1673 2BC2          SUB   AX,DX
  34. 1111:1675 A39802        MOV   [0298],AX
  35. 1111:1678 A12C00        MOV   AX,[002C]
  36.  
  37.  
  38. So, to change your default environment size to 1280, type:
  39.  
  40.         DEBUG COMMAND.COM
  41.         -E 1666 50 00
  42.         -W
  43.         -Q
  44.